Options and configuration


The Options dialog enables you to customize many WinMerge features. To set WinMerge options:

  1. Click EditOptions in the menu or the WinMerge Options button Options button in the toolbar.

    The Options dialog contains a number of pages, each containing a group of related options. You can open any page by clicking its title in the Categories list, on the left side of the dialog.

  2. Configure the options you want to change using one or both of these methods:

  3. When you have set all your options, click OK to save them and dismiss the dialog.

This topic describes the options in detail. There is a section for each page in the Options dialog.

1. Importing and Exporting options

If you change options frequently for different compare or merge scenarios, or if you want to share your settings with other WinMerge users, consider saving your settings by exporting them to an options file. Then, whenever you want to use those settings, you can simply import the options file instead of setting options manually.

To export options

When you have set your options the way you want them, click Export. In the Select file for export dialog, specify a path and name for your options file (the type ini is automatically appended), and click Save.

In the generated text ini file, each line contains a name-value pair that defines a single option.

To import options

When you want to reuse your saved options, click Import. In the Select file for import dialog, navigate to the saved ini file and click Open.

The values in your imported options file replace all existing settings.

2. General options

The General page has these options:

2.1. Automatically scroll to first difference

  • Disabled (default): Compare window opens to the top of the folder or file, with no difference selected.

  • Enabled: When it first opens, the Compare window selects the first difference, scrolling to the location if necessary.

    • For a folder compare, selects the first different file or folders.

    • For a file compare, selects the first difference block in the files.

2.2. Disable splash screen

  • Disabled (default): A splash screen is displayed when you start WinMerge. You can dismiss the screen at any time by clicking it; otherwise it is automatically dismissed after a few seconds.

  • Enabled: Completely omits the splash screen when you start WinMerge. Note that this does not make startup faster.

2.3. Close Windows with ESC

  • Enabled (default): Lets you use the ESC key to close WinMerge windows. Pressing ESC once closes one window, so with one File Compare window open, it takes three key presses to close WinMerge: first the File Compare window, then the Folder Compare window, and finally the WinMerge window.

    Note that in the WinMerge command line, the -e parameter enables you to close WinMerge by pressing ESC just once.

  • Disabled: Pressing ESC does not close any WinMerge windows.

2.4. Automatically verify paths in Open-dialog

  • Enabled (default): The Select Files or Folders dialog checks both paths as you enter them. The OK button remains disabled until both paths are validated. Note that this checking can cause some delay.

  • Disabled: The OK button in the Select Files or Folders dialog is always enabled, and attempts to open any paths you specify. Since there is no delay during validation, this can speed up the selection of paths. However, if the path cannot be opened, an error dialog is displayed.

2.5. Allow only one instance to run

  • Disabled (default): You can run multiple WinMerge instances. For example, if WinMerge is currently running and you click the WinMerge desktop shortcut, a new WinMerge window is opened.

  • Enabled: Limits the WinMerge program to one instance:

    • If WinMerge is currently running and you try to start a new instance, no new application window is opened: the current WinMerge window is used instead.

    • If you start a new instance with paths (for example on the command line), a new Compare window is opened in the existing WinMerge window.

Also see the related options under Enable multiple compare windows for.

2.6. Ask when closing multiple windows

  • Disabled (default): If you exit WinMerge while multiple Compare windows are open, WinMerge prompts you to confirm whether to close all the windows.

  • Enabled: If you click Exit and there are no pending file changes, WinMerge closes immediately.

2.7. Preserve file time in file compare

  • Disabled (default): If you save changes to a file in WinMerge, the timestamp of the file is updated.

  • Enabled: If you save changes to a file in WinMerge, the timestamp of the file is not changed in your file system.

2.8. Open-dialog Auto-Completion

Choose one of these options:

  • Disabled (default): No autocompletion is performed when you enter paths in the Select Files or Folders dialog.

  • From file system: Checks paths as you type. It attempts to locate paths in the file system that match the letters you type, and if a matching path is found, completes the path.

  • From MRU list: Checks paths only from the most recently used (MRU) list. This is handy when you have a limited set of paths to compare.

2.9. Enable multiple compare windows for

Controls whether WinMerge allows you to open single or multiple Compare windows. Specify the Folder compare and File compare options independently:

  • Disabled (default): You can only open one Folder compare or File compare window at a time.

  • Enabled: You can open multiple Folder or File compare windows simultaneously.

    [Note] Note

    File Compare windows are children of Folder Compare windows. Therefore, you can open one File Compare window for every Folder Compare window, even if the File compare option is disabled.

2.10. Reset

WinMerge allows you to suppress some common message boxes. For example, when two identical files are opened, the message box titled, The files are identical, is normally opened. If you don't want this box to display any more, you can enable (check) the option in that message box to not show the message again.

Later, you might decide that you want to see those messages again. If so, click the Reset button to make the message boxes display again.

[Note] Note

We recommend that you not suppress messages when updating WinMerge to a newer version. The installer enables their display automatically, but if you don't use the installer, then remember to enable message display by using the Reset button.

3. Compare options

The options in this page enable you to change some of the ways that WinMerge detects differences, such as comparing only file size, or ignoring some types of differences, like case.

[Important] Important

Customizing difference detection can be useful during comparisons, when you might not be interested in some differences. However, these options also affect merging. For example, if you ignore whitespace changes, then indentation changes in source code files are not preserved when you merge.

For this reason, before you merge any differences, we strongly recommend resetting the options on this page to their default settings, especially the ignore options. To reset all the options on this page, click the Defaults button.

3.1. About ignore options

A number of options in the Compare page (described later in this section) enable you to ignore certain differences. Ignored differences are treated in special ways in WinMerge:

  • They are marked with the Ignored Difference color.

  • Ignored differences cannot be merged

  • Ignored differences are not included in difference counts

  • Files containing only ignored differences are marked as identical in a folder comparison

3.2. Whitespace

Whitespace, the space between words and lines, is represented in text files by special, nonprinting characters like spaces, tabs, and linefeeds. The significance of whitespace varies a lot: spaces between words are usually important; in some text documents, indents and linefeeds are critical to meaning and readability; in structured code, linefeeds and tabs might be significant.

These whitespace options are available:

Compare

Default: All whitespace is compared. If you are not sure which option your document requires, this is the safest choice. In the example below, all lines are detected as different.

Example 1. Ignore whitespace change

One space between words:

Two Words

Two spaces between words:

Two  Words

Tab between words:

Two	Words

No spaces between words:

TwoWords

Ignore change

Compares differences in whitespace. In the preceding example, the first three lines have different whitespace, but are detected as identical: tabs and multiple are treated as if they are single space. The last line has no whitespace, so the difference is not ignored (in effect, the words in the last two lines are different):

Ignore all

Ignores all whitespace characters, except linefeeds (so lines are detected, and preserved in a merge). All lines in the preceding example are detected as identical.

3.3. Ignore blank lines

  • Disabled (default): Empty lines in the source files are detected and represented in the File Compare window as blank lines with the Deleted Difference colors.

  • Enabled: Empty lines in the source files are ignored. They are represented in the File Compare window as blank lines with the Ignored Difference colors. However the difference cannot be merged.

3.4. Ignore case

  • Disabled (default): Comparisons are case-sensitive. For example, LowerCase, LOWERCASE, and lowercase are all different.

  • Enabled: Differences between lowercase and uppercase letters are ignored.

3.5. Ignore carriage return differences (Windows/Unix/Mac)

  • Disabled (default): WinMerge detects end of line (EOL) style differences. For example, if you compare two lines that have the same contents but different line endings, the lines are considered to be different. When this happens, WinMerge displays a dialog prompting you to confirm whether to detect or ignore the difference.

  • Enabled: EOL differences are ignored.

3.6. Enable moved block detection

  • Disabled (default): WinMerge does not detect when differences are due to moved lines.

  • Enabled: WinMerge tries to detect lines that are moved (in different locations in each file). Moved blocks are indicated by the Moved and Selected Moved difference colors. If the Location bar is displayed, corresponding difference locations in the left and right location bars are connected with a line. Showing moved blocks can make it easier to visualize changes in files, if there are not too many.

    For an example, see the Location pane description in Comparing and merging files.

3.7. Ignore time differences less than 3 seconds

  • Disabled (default): Files with different timestamps are detected as different.

  • Enabled: Sometimes (for example, when you use network shares) small differences in timestamps are not significant. To get more meaningful results in such situations, this option enables you to ignore time differences smaller than three seconds.

    This option works only with the Modified Date and Modified Date and Size compare methods (described in File Compare method). It has no effect with other methods.

    [Warning] Warning

    This option should be enabled only when the time difference is detected. Otherwise, it can cause incorrect compare results.

3.8. File Compare method

This option lets you determine how complete your file comparisons are. Choose one of these five choices:

Full Contents

Default: Full comparison of files by content, with all the bells and whistles. This method invokes plugins and uses the diffutils engine for fully accurate differencing and moved block detection. This is the most complete and recommended method.

Quick Contents

Slimmed-down comparison of files by content. This method uses streamlined file comparison code which skips plugins and moved block detection. This method is faster than Full Contents, because it does not load the files.

Its drawback is that line filters are not applied when comparing. For example, this method sees file as different even if line filters are set to ignore all differences in the files.

Modified Date

Compares only the modification dates on the files, so it is far faster than either of the contents methods. But obviously, it is only as accurate as the modification dates.

Modified Date and Size

Similar to Modified Date, but also checks file sizes when dates are identical.

Size

Compares only file sizes, so it is fast but not as accurate as the contents methods.

3.9. Stop after first difference

This option is enabled only when the Quick Contents compare method is selected.

  • Disabled (default): WinMerge examines all differences in the files.

  • Enabled: This option optimizes comparisons by examining files only until the first difference is found, instead always scanning the entire files.

    The drawback is that WinMerge may be unable to identify binary files as binary. This is likely to happen if the first difference is near the beginning of the file. If you know what kind of files you are comparing (for example, which are binary files), this option can be a good way to speed up comparisons. However, don't enable this option if you are not sure what kind of files you are comparing.

3.10. Filter Comments

  • Disabled (default): WinMerge compares comments in code, along with other content.

  • Enabled: This option optimizes comparisons by detecting comments in certain programming language file types (such as C++ and Java), and ignoring them.

    The recognized file types and their comment markers are defined in the file, IgnoreSectionMarkers.ini, at the top of the WinMerge installation directory.

4. Editor options

4.1. Syntax highlighting

  • Enabled (default): WinMerge can syntax highlight many programming language and web formats. To see the formats that are supported by default, click ViewSyntax Highlight.

  • Disabled: Syntax highlighting consumes some processing power, so if WinMerge screen updating seems to be slow, turning off this option might help.

4.2. Automatic rescan

  • Disabled (default): WinMerge rescans automatically when you merge a difference, or if you manually rescan (for example, click the Rescan button).

  • Enabled: Forces WinMerge to rescan after every edit event (a change to files, like typing).

    [Note] Note

    To avoid slowing down your editing, WinMerge delays automatic rescanning a little: it waits one second after each edit event. Because each new edit event resets the timer, no rescans occur until you pause or stop editing.

4.3. Preserve original EOL chars

  • Disabled (default): Assumes that files are meant to be Windows files. If a file does not use the standard Windows line ending, WinMerge considers this to be an error. It silently changes the line endings to the Windows style instead of detecting them as differences. Thus, the File Compare window status bar shows the EOL style as Win.

    For most situations, you should leave this option disabled: this default behavior works even when comparing two files that have different line ending styles.

  • Enabled: Prevents WinMerge from automatically changing line endings, so that it detects different EOL styles for every line. This might be useful for handling files from systems with different EOL styles (for example, Windows and Unix).

    [Important] Important

    This is an advanced option for users who are familiar with EOL bytes and who want to compare files with different EOL styles inside one file. We recommend that you not enable this option unless you need this advanced functionality. Remember, this option is not required to compare two files with different EOL styles.

4.4. Tab options

Tab size

Width of a tab space. Specify a value n : the resulting width is equivalent to that of n characters. Default: 4. The maximum value is 64.

Tab insert options

Determines what kind of character is used when you insert a tab in text. Only one of these options can be enabled:

  • Insert Tabs (default): Uses a single tab character.

  • Insert Spaces: Uses one or more spaces (determined by the Tab size) instead of a tab character. For example, with the default tab size, four spaces are inserted.

4.5. View line differences

WinMerge can highlight not only different lines, but also differences within lines. You can enable and disable line difference coloring using either the View Line Differences option in this page, or by clicking ViewView Line Differences. For example, when the menu item is checked, the option in this page is also checked, and changing either setting automatically changes the other.

However, View Line Differences and the options under it give you control over exactly what kinds of differences are detected within lines:

  • Enabled (default): WinMerge highlights differences within lines (also enables the ViewView Line Differences menu item).

    When this option is enabled, you can choose one of these suboptions. The best choice usually depends on the file types you are comparing:

    • Character level: Detects individual characters that are different. This option can be useful for file formats that do not have clear word breaks, or if you are looking for single-character differences. For example, this level makes it easy to spot a single changed character in the middle of a word.

    • Word-level (default): Detects words that are different. Possible advantage: making it easy to copy and paste words.

      • Break at whitespace (default): Words are assumed to be separated by whitespace characters. This usually works for typical text files.

        For example, these two lines contain punctuation but no whitespace. So, with the Break at whitespace option, WinMerge detects no word breaks. Instead, it highlights the text as a single word-level line difference.

        10,20,30,40,50
        10,25,30,45,50
      • Break at whitespace or punctuation: Considers both whitespace and punctuation characters to be word breaks. This is useful for handling lists that are separated with punctuation (like comma-separated lists). In the preceding example, WinMerge highlights only 20 and 40 in the first line, and 25 and 45 in the second line.

  • Disabled: WinMerge does not highlight differences within lines, and all settings for the level and whitespace options are ignored (also disables the ViewView Line Differences menu item).

5. Colors options

Use this page if you want to change any of the difference colors used in the File Compare window. You can set the background, deleted, and text color.

To change a color, click in its box to open a standard Color chooser dialog. Choose one of the predefined colors or define your own custom color, then click OK to load the new color in the box.

At any time, you can click Defaults to reload the installed color scheme.

6. Text Colors options

Use this page to change the colors used for text. First, check the option, Use customized text colors. This activates the text options. There is an option for three kinds of text: whitespace, regular text, and selected text. For each kind of text , you can choose a color for the background and the text.

7. Syntax Colors options

By default, the WinMerge File Compare window marks the syntax of certain kinds of source code, as described in Syntax highlighting. This page lists the syntax elements that are recognized, and enables you to change their text color and weight.

At any time, you can click Defaults to reload the installed color scheme.

8. Archive Support

This page contains options for configuring Winzip archive support using 7-Zip.

8.1. Download 7-zip Plugin

If WinZip is already installed on your system, WinMerge automatically detects it, and you don't need to configure anything here. Otherwise, you can click this link to open the WinMerge downloads page in your Web browser. There, you can download the 7-Zip Plugin installer (and other WinMerge files). To install the plugin, see 7-Zip and archive support. Remember to close WinMerge before running the 7-Zip installer.

8.2. Enable archive file support

This option controls how WinMerge handles archive files (based on 7-Zip integration).

  • Enabled (default): WinMerge recognizes 7-Zip archives.

    WinMerge can access 7-Zip from two installation sources. If you specified one of these methods earlier (for example, during the WinMerge installation), you can change it here:

    • Use stand-alone 7-Zip if available

    • Use local 7-Zip from WinMerge folder

  • Disabled: Turns off 7-Zip archive integration.

8.3. Detect archive type from file signature

  • Disabled (default): WinMerge recognizes only archives whose file extension is known on your system (for example, in the registry or through a file association).

  • Enabled: WinMerge can recognize archive files even if their file extension is not known. To recognize an archive, WinMerge searches the beginning of the file for the archive signature bytes.

    [Tip] Tip

    You can use this option to enable WinMerge to recognize Open Office files.

9. System options

9.1. Send deleted files to Recycle Bin

  • Enabled (default): Files and folders that you delete in a Folder Compare window are moved to the Recycle Bin, if it is available.

    [Important] Important

    Remember: if the Recycle Bin on your system has been deactivated, this option does not work, and deleted files are lost!

  • Disabled: Files and folders deleted in a directory compare actually deleted.

9.2. Add to explorer context menu

  • Enabled (default): Adds one or more WinMerge shortcuts to the Windows Explorer context menu. After right-clicking one or more files or folders, choose a WinMerge shortcut to open the items in a WinMerge compare window.

    Two additional options are available if you use this integration. Neither option is enabled by default, but you can enable one or both:

    Enable advanced menu
    • Disabled (default): The WinMerge shortcut is included in the Windows Explorer context menu when you right-click one or more files or folders. If you select a single item, the Select Files or Folders dialog opens. If you select two items, they are opened directly in a Compare window.

    • Enabled: Replaces the WinMerge shortcut in the Explorer context menu with Compare shortcuts, described in Shell integration. The Compare shortcuts enable you to add a selected path to memory, then choose the second separately (for example, in a different Explorer view).

    Include subfolders by default
    • Disabled (default): When you use the WinMerge or Compare shortcut, only the top level of files is selected: the compare operation is non-recursive.

    • Enabled: The selection includes subfolders, making the compare operation recursive.

      Another way to include subfolders is to press Control while selecting the WinMerge or Compare shortcut in the Windows Explorer context menu.

  • Disabled: The WinMerge shortcut is unavailable in Windows Explorer.

9.3. External editor

The WinMerge File Compare window provides common editing functions. If you prefer using your favorite, full-featured editor, you can configure WinMerge to open an external editor from the Folder Compare context menu.

By default, Notepad is configured as the default external editor, because it is found on all Windows systems. To configure a different external editor, enter the full path to its executable file.

[Tip] Tip

Along with the path, you can include any command line parameters supported by the external tool, in this format: path to executable -option1 -option2 ...

To use the configured external editor, right-click a file in the Folder Compare window and choose Open Leftwith External Editor or Open Rightwith External Editor.

9.4. Filter Folder

Use this field to specify your own private folder for file filters. By default this folder is your user profile directory (for example, My Documents on Windows XP, or Documents on Windows Vista). When you create a file filter, it is automatically added to this folder.

9.5. Temporary files folder

Specify the folder where WinMerge stores temporary files. Either one of these options is available:

  • System's temp folder (default): For example, this might be C:\Windows\Temp on your system.

  • Custom folder: Click Browse and select a different folder where you have write access.

10. Backup Files

This page allows you to control how WinMerge creates backup files.

10.1. Create backup files in

Specify when WinMerge should create backup files. You can enable or disable each of these options independently:

  • Folder compare (disabled by default): Backup files are create whenever files are overwritten (copied).

  • File compare (enabled by default): Backup files are created whenever files are saved.

10.2. Create backup files into

Specify where backup files are created. Only one of these options can be enabled:

  • Original file's folder (enabled by default): Backup files are created in the same folder as the source file. This is usually a good choice. The down side is that cleaning up backup files in big folders can take a lot of work.

  • Global backup folder (disabled by default): All backup files are created in one global folder. This makes them easy to clean up. But, if there are multiple source files with same file name, then the most recent backup file overwrites the previous one of the same name.

10.3. Backup filename

When WinMerge creates a backup file, it appends an extension to the source file name. You can choose either or both of these extension schemes:

  • Append .bak -extension (enabled by default): For example, the file.txt is backed up to file.txt.bak.

  • File compare (enabled by default): Timestamps are almost always unique, so this option usually avoids duplicating backup file names when the source files have the same names.

    Also, storing a copy of a file each time you save it provides a way to track changes to the file. However, you should consider that this option can create a lot of files.

11. Version Control options

Use this page to configure or disable the WinMerge integration with a supported versioning system.

Choose one of these options:

  • None (default)

  • Visual SourceSafe (less than 5.0)

    Also enter the path to SS.EXE.

  • Visual SourceSafe (5.0 and above)

  • Rational ClearCase

    Also enter the path to cleartool.exe.

12. Codepage options

This page allows you to specify the codepage that the ANSI version of WinMerge uses for ANSI files. , and whether the codepage of certain file formats should be detected from the contents of the files.

[Important] Important

The ANSI version of WinMerge (WinMerge.exe) is normally installed only on Windows 9X and WME. On all other, newer Windows systems, the Unicode version (WinMergeU.exe) is installed. The Unicode version of WinMerge handles encoding transparently. You should not need to change any settings in this page unless you are running the ANSI version.

[Note] Note

A full explanation of text encoding and Windows codepages is beyond the scope of WinMerge documentation. Fortunately, there is lots of information about them on the Internet. For example, here are some places to start:

12.1. Default codepage for ANSI files

Choose one of these radio buttons to set the default codepage that WinMerge uses when handling ANSI files:

  • System codepage (default):The codepage used by your Windows system. This default is usually the best choice. However if you know that you are comparing files that do not use the system codepage, consider one of the other options.

  • According to WinMerge User Interface: The encoding used by your installation of WinMerge.

  • Custom codepage: Enter the codepage number explicitly. For example, UTF-8 or ISO-8851-1.

12.2. Detect codepage info for these files: .html .rc .xml

[Important] Important

Uncheck this option in WinMerge.exe. Characters conversions can result in lossy conversions and the risk is very high. WinMerge.exe can display files only with your current codepage.

  • Disabled (default): WinMerge does not read codepage information from the source files. It uses the default codepage setting instead.

  • Enabled: WinMerge detects the codepage for these extensions : html, rc (resource files for VC++) and xml. The detected codepage overrides the setting for the default codepage option.

    This option is of interest when your documents use a codepage that is different from the codepage of your Windows configuration.

    For example, you might merge two Slovak or two Japanese files in an English environment. With this option enabled (and with the required fonts), your Slovak, or Japanese, the files are displayed using Slovak, or Japanese, characters.

    WinMerge also detects a codepage difference between the left/right files. To avoid lossy conversions when you merge, copy, or paste, we suggest that you ignore the codepage information.

    [Caution] Caution

    When you copy or paste text to an external application, the external application must use the same codepage as WinMerge does. Refer to the documentation for your external editor. For copying to WinMerge, Internet Explorer offers codepage selection. If your external editor does not support custom codepages, disable this option.